package com.yi.service.impl;

import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;

import com.yi.service.IRewardAndPubnishService;
import com.yi.student.dao.IRewardAndPunishDao;
import com.yi.student.model.RewardAndPubnish;

@Service("rewardAndPubnishServier")
public class RewardAndPubnishServierImpl implements IRewardAndPubnishService {

	private IRewardAndPunishDao rewardAndPunish ;
	
	public IRewardAndPunishDao getRewardAndPunish() {
		return rewardAndPunish;
	}

	@Inject
	public void setRewardAndPunish(IRewardAndPunishDao rewardAndPunish) {
		this.rewardAndPunish = rewardAndPunish;
	}

	@Override
	public void addRap(RewardAndPubnish rap) {
		rewardAndPunish.add(rap);
	}

	@Override
	public void deleRap(int id) {
		
		rewardAndPunish.delete(id);
	}

	@Override
	public List<RewardAndPubnish> findPubnishStudent() {
		
		return rewardAndPunish.listPunishStudent();
	}

	@Override
	public List<RewardAndPubnish> findRewardStudent() {
		
		return rewardAndPunish.listRewardStudent();
	}

	@Override
	public RewardAndPubnish loadById(int id) {

		return rewardAndPunish.load(id) ;
	}

	@Override
	public void updateRap(RewardAndPubnish rap) {

		rewardAndPunish.update(rap);
	}

	@Override
	public List<RewardAndPubnish> findPubnishStudentById(int uid) {

		return rewardAndPunish.listPublishByStuId(uid);
	}

	@Override
	public List<RewardAndPubnish> findRewardStudentById(int uid) {
		return rewardAndPunish.listRewardByStuId(uid);
	}

	@Override
	public List<RewardAndPubnish> listPad(int year, String semeter) {
		return rewardAndPunish.listPad(year, semeter);
	}

	@Override
	public List<RewardAndPubnish> listPap(int year, String semeter) {
		return rewardAndPunish.listPap(year, semeter);
	}

	@Override
	public List<RewardAndPubnish> listRadAndRpd(String xh) {
		return rewardAndPunish.listRadAndRpd(xh);
	}
}
